﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CodeGame.ServerObjects.ServerWorldEnts
{
    internal class ResourceNode : Entity
    {
        public ResourceNode()
            : base(ServerSingletons.GetUID(10), null)
        {

        }

        public override void Move(string id, int amount)
        {
            return;
        }

        public override void Turn(string id)
        {
            return;
        }

        public override void Spawn(string id, int x, int y)
        {
            if (id == "SERVER")
            {
                base.Spawn(this.GetPID(), x, y);
            }
        }

        public override void Update()
        {
            if (this.Owner != null)
            {
                this.Owner.GiveResouces(Balence.ResoucesPerTick);
            }
        }
    }
}
